export const getXinlvOption = (attr) => {
    // const data = attr.xinlvreducelist ? attr.xinlvreducelist.split(',') : []
    const xinlvOption = {
        title: {
            text: '次/分',
            textStyle: {
                fontSize: 9,
                color: '#666666'
            }
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['心率的变化趋势'],
            icon: 'circle',
            right: 0,
            itemWidth: 9,
            itemStyle: {
                color: '#5BBF70'
            },
            textStyle: {
                color: '#333333',
                fontSize: 13
            }
        },
        grid: {
            left: '0%',
            right: '3%',
            bottom: 0,
            top: '15%',
            containLabel: true,
            show: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            show: false,
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
            splitLine: {
                show: true
            },
            axisTick: {
                show: false
            },
            axisLine: {
                show: false
            }
        },
        yAxis: {
            type: 'value',
            nameGap: 0,
            splitLine: {
                show: true
            }
        },
        series: [
            {
                name: '心率的变化趋势',
                type: 'line',
                stack: 'Total',
                data: ['23','23','23','23','23','23','23'],
                areaStyle: {
                    color: '#5BBF70',
                    opacity: '0.2'
                },
                lineStyle: {
                    color: '#5BBF70',
                },
                symbol: 'circle',
                symbolSize: 6,
                itemStyle: {
                    color: '#5BBF70',
                    borderColor: '#ffffff'
                },
                label: {
                    show: true,
                    position: 'top',
                    color: '#5BBF70',
                    fontSize: 10
                },
            }
        ]
    }

    return xinlvOption
}

export const getStrengthOption = (attr) => {
    const data = attr.level6reducelist.split(',')

    const strengthOption = {
        title: {
            text: 'MET',
            textStyle: {
                fontSize: 9,
                color: '#666666'
            }
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['运动强度的变化趋势'],
            icon: 'circle',
            right: 0,
            itemWidth: 9,
            itemStyle: {
                color: '#D44EE8'
            },
            textStyle: {
                color: '#333333',
                fontSize: 13
            }
        },
        grid: {
            left: '0%',
            right: '3%',
            // bottom: 40,
            bottom: '0',
            top: '15%',
            containLabel: true,
            show: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            show: false,
            // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
            splitLine: {
                show: true
            },
            axisTick: {
                show: false
            },
            axisLine: {
                show: false
            }
        },
        yAxis: {
            type: 'category',
            nameGap: 0,
            data: ['A', 'B', 'C', 'D', 'E', 'F'],
            axisTick: {
                show: false
            },
            splitLine: {
                show: true
            },
            axisLine: {
                show: false
            }
        },
        series: [
            {
                name: '运动强度的变化趋势',
                type: 'line',
                stack: 'Total',
                data: data,
                areaStyle: {
                    color: '#D44EE8',
                    opacity: '0.2'
                },
                lineStyle: {
                    color: '#D44EE8'
                },
                symbol: 'circle',
                symbolSize: 6,
                itemStyle: {
                    color: '#D44EE8',
                    borderColor: '#ffffff'
                },
                label: {
                    show: true,
                    position: 'top',
                    color: '#D44EE8',
                    fontSize: 10
                },
            }
        ]
    }

    return strengthOption
}